<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    body{
        background-color: aqua;
    }
    </style>
</head>
<body>
    <script>
        window.addEventListener("message",(e)=>{
            if(e.data.idnexOf("xb-hf.hgame.com")>-1){
                location.href = "http://baidu.com";
            }
            console.log(1233213,e.data)
        })
        window['sss1'] = function(e){
            console.log(e);
        }
        </script>

        <iframe src="http://baidu.com" frameborder="0"></iframe>
        <script>
        
        var ifra = document.querySelector("iframe");
        ifra.width = innerWidth*0.8;
        ifra.height = innerHeight*0.8;
        </script>
</body>
</html>